1. Field of the Invention
The present invention generally relates to image processing, and more particularly to a black level calibration method and system.
2. Description of the Related Art
Unless otherwise indicated herein, the approaches described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
An image sensor such as a complementary metal-oxide-semiconductor (CMOS) sensor or a charge-coupled device (CCD) sensor is often made up of an array of individual pixel sensors, each of which is configured to collect photons incident on the image sensor. The number of photons collected in each pixel sensor is converted into an electrical charge by a photodiode. This charge is then converted into an analog voltage, which may be amplified, adjusted, and converted to a digital value by an analog-to-digital converter, so that the information obtained from the individual pixel sensors can be processed, usually by a digital signal processor, into a final digital image.
Most image sensors require some form of calibration before use so that the data obtained from the image sensors can be used to produce digital images that faithfully reproduce the optical characteristics (e.g., intensity and color) of the scene or object whose image was captured. One type of calibration is referred to as black level calibration, which effectively sets a threshold below which digital data values obtained from the image sensor will be considered to represent a black level, or to represent the absence or substantial absence of light. Accurate black-level calibration helps to achieve a digital picture with full contrast and subtle details in dark shadow regions. If the black level is too low, information in dark areas may be lost. Conversely, if the black level is too high, signal range may be sacrificed.
In conventional systems, a border of an array of pixel sensors is surrounded with a number of rows and columns of light shielded, or black, pixels. These pixels may provide black reference information or black pixel data, which may be utilized to stabilize downstream image processing and to establish the correct black value in an output image.
Traditionally, the black pixel data may be indiscriminately grouped together for black level calibration. Thus, the calibrated black level may be accurate for some of the pixels but not for the other pixels. Moreover, conventional systems often fail to take into account bad black pixels, which are associated with data that may be either significantly larger than or smaller the other black pixel data. The calibrated black level may as a result become skewed and unreliable.